package com.xiao.service;

import com.github.pagehelper.PageHelper;
import com.xiao.dao.StudentMapper;


import com.xiao.pojo.Books;
import com.xiao.pojo.Student;

import java.util.List;

public class StudentServiceImpl implements StudentService{
private StudentMapper studentMapper;
public void setStudentMapper(StudentMapper studentMapper){
    this.studentMapper=studentMapper;
}
    public Student selectStudentBySNo(String sno) {
        return studentMapper.selectStudentBySNo(sno);
    }

    public int addStudent(Student student) {
        return studentMapper.addStudent(student);
    }

    public List<Student> queryAllStudent(int page, int size) {
        PageHelper.startPage(page,size);


        return studentMapper.queryAllStudent();
    }

    public int updateStu(Student student) {
        return studentMapper.updateStu(student);
    }

    public int deleteStu(int sid) {
        return studentMapper.deleteStu(sid);
    }


}
